blockdev: Handle ESP discovery on Intel VROC RAID devices#2129
blockdev: Handle ESP discovery on Intel VROC RAID devices#2129cgwalters merged 1 commit intobootc-dev:mainfrom
Conversation
Intel VROC creates a topology where NVMe disks have MD RAID arrays as children, with the actual partitions (including the ESP) nested under the RAID array: nvme0n1 → md126 → md126p1 (ESP). Previously find_partition_of_esp_optional() only searched direct children, so it would miss the ESP in this layout. Now it recurses into children that carry their own partition table, which handles the firmware RAID case naturally. Add a lsblk JSON fixture representing a dual-NVMe firmware RAID1 layout and a test validating that ESP discovery works through the RAID layer. Assisted-by: Claude Code (Opus 4) Signed-off-by: ckyrouac <ckyrouac@redhat.com>
There was a problem hiding this comment.
Code Review
This pull request updates the find_partition_of_esp_optional function in the blockdev crate to support recursive searching for EFI System Partitions (ESP). This change allows the system to correctly identify ESPs in complex storage hierarchies, such as firmware RAID arrays (e.g., VROC), where partitions are nested within child devices. Additionally, new test fixtures and unit tests for software RAID and VROC configurations have been added to verify the recursive detection logic. I have no feedback to provide.
| // Recurse into children that carry their own partition table, such as | ||
| // firmware RAID arrays (disk → md array → partitions). |
There was a problem hiding this comment.
Optional followup: I think this works and is correct. However...just thinking about this more, what feels architecturally cleaner is a model where we always walk up to all parents, then gather all children from there, then check all ESPs we found - deduplicating here by UUID - since in the VROC case we see the same ESP via multiple paths.
|
The c9s one failed with I restarted it |
Intel VROC creates a topology where NVMe disks have MD RAID arrays as children, with the actual partitions (including the ESP) nested under the RAID array: nvme0n1 → md126 → md126p1 (ESP).
Previously find_partition_of_esp_optional() only searched direct children, so it would miss the ESP in this layout. Now it recurses into children that carry their own partition table, which handles the firmware RAID case naturally.
Add a lsblk JSON fixture representing a dual-NVMe firmware RAID1 layout and a test validating that ESP discovery works through the RAID layer.
Assisted-by: Claude Code (Opus 4)